﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ScoreAnalyzer.Core.Base;
using ScoreAnalyzer.Core.Util;
using ScoreAnalyzer.Data;

namespace ScoreAnalyzer.Web
{
    public partial class Default : BaseWebpage  
    {
        ScoreAnalyzer.Data.Entities _Entity = new Entities();

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.SetCombo();
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Response.Redirect("/Result.aspx");
        }

        protected void SetCombo()
        {
           
            ControlUtil.DropDownListDataBind(this.drpSiteList, _Entity.SiteList(), "SiteSeq", "SiteNm");
            ControlUtil.DropDownListDataBind(this.drpItem, _Entity.PROC_GameTypeList(), "GAMETYPE", "GAMETYPE");
            
        }

        protected void drpItem_SelectedIndexChanged(object sender, EventArgs e)
        {
           ControlUtil.DropDownListDataBind(this.drpLeage, _Entity.PROC_League_Inquery(this.drpItem.SelectedValue), "LeagueSeq", "LeagueNM");
        }
    }
}